#/bin/bash
#######################################################################
# Script install.sh
# Alunos: Fausto 
# Funcao: verificar se a estrutura de diretorios necessaria para o fun
# cionamento do Sistema de backup existe neste computador
# Metodo de execucao: o script seráxecutado sempre que o programa for
# executado e fara correcoes sempre que forem necessarias
#######################################################################

# Estrutura necessaria para funcionamento do sistema

#/etc/SisBackup2
#/etc/Sisbackup2/config - diretorio com os arquivos de configuracao
#/etc/Sisbackup2/jobs - diretorio com as definicoes dos jobs
#/var/log/Sisbackup2 - diretorio que armazenara os logs do sistema
#/tmp/SisBackup2/backups - diretorio para armazenar os arquivos temporarios de backup

[ -e /etc/SisBackup2 ] || mkdir /etc/SisBackup2
[ -e /etc/SisBackup2/config ] || mkdir /etc/SisBackup2/config
[ -e /etc/SisBackup2/jobs ] || mkdir /etc/SisBackup2/jobs
[ -e /var/log/SisBackup2 ] || mkdir /var/log/SisBackup2
[ -e /tmp/SisBackup2 ] || mkdir /tmp/SisBackup2
[ -e /tmp/SisBackup2/backups ] || mkdir /tmp/SisBackup2/backups
[ -e /etc/SisBackup2/job.sh ] || cp ./install/job.sh /etc/SisBackup2/core
[ -e /etc/SisBackup2/install.sh ] || cp ./install/install.sh /etc/SisBackup2/core



